3.181 \(\int (a+b \log (c x^n))^p (d+e \log (f x^r)) \, dx\)

Optimal. Leaf size=271 \[ x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+1,-\frac{a+b \log \left (c x^n\right )}{b n}\right )-e r x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+2,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right )-\frac{e r x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^{p+1} \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+1,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right )}{b n} \]

[Out]

-((e*r*x*Gamma[2 + p, -(a/(b*n)) - Log[c*x^n]/n]*(a + b*Log[c*x^n])^p)/(E^(a/(b*n))*(c*x^n)^n^(-1)*(-((a + b*L
og[c*x^n])/(b*n)))^p)) - (e*r*x*Gamma[1 + p, -(a/(b*n)) - Log[c*x^n]/n]*(a + b*Log[c*x^n])^(1 + p))/(b*E^(a/(b
*n))*n*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p) + (x*Gamma[1 + p, -((a + b*Log[c*x^n])/(b*n))]*(a + b*L
og[c*x^n])^p*(d + e*Log[f*x^r]))/(E^(a/(b*n))*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.166189, antiderivative size = 271, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {2300, 2181, 2361, 12, 15, 19, 6557} \[ x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+1,-\frac{a+b \log \left (c x^n\right )}{b n}\right )-e r x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+2,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right )-\frac{e r x e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^{p+1} \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text{Gamma}\left (p+1,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right )}{b n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]),x]

[Out]

-((e*r*x*Gamma[2 + p, -(a/(b*n)) - Log[c*x^n]/n]*(a + b*Log[c*x^n])^p)/(E^(a/(b*n))*(c*x^n)^n^(-1)*(-((a + b*L
og[c*x^n])/(b*n)))^p)) - (e*r*x*Gamma[1 + p, -(a/(b*n)) - Log[c*x^n]/n]*(a + b*Log[c*x^n])^(1 + p))/(b*E^(a/(b
*n))*n*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p) + (x*Gamma[1 + p, -((a + b*Log[c*x^n])/(b*n))]*(a + b*L
og[c*x^n])^p*(d + e*Log[f*x^r]))/(E^(a/(b*n))*(c*x^n)^n^(-1)*(-((a + b*Log[c*x^n])/(b*n)))^p)

Rule 2300

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2181

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> -Simp[(F^(g*(e - (c*f)/d))*(c +
d*x)^FracPart[m]*Gamma[m + 1, (-((f*g*Log[F])/d))*(c + d*x)])/(d*(-((f*g*Log[F])/d))^(IntPart[m] + 1)*(-((f*g*
Log[F]*(c + d*x))/d))^FracPart[m]), x] /; FreeQ[{F, c, d, e, f, g, m}, x] &&  !IntegerQ[m]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 15

Int[(u_.)*((a_.)*(x_)^(n_))^(m_), x_Symbol] :> Dist[(a^IntPart[m]*(a*x^n)^FracPart[m])/x^(n*FracPart[m]), Int[
u*x^(m*n), x], x] /; FreeQ[{a, m, n}, x] &&  !IntegerQ[m]

Rule 19

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(a^(m + n)*(b*v)^n)/(a*v)^n, Int[u*v^(m + n),
 x], x] /; FreeQ[{a, b, m, n}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] && IntegerQ[m + n]

Rule 6557

Int[Gamma[n_, (a_.) + (b_.)*(x_)], x_Symbol] :> Simp[((a + b*x)*Gamma[n, a + b*x])/b, x] - Simp[Gamma[n + 1, a
 + b*x]/b, x] /; FreeQ[{a, b, n}, x]

Rubi steps

\begin{align*} \int \left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right ) \, dx &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-(e r) \int e^{-\frac{a}{b n}} \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \, dx\\ &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (e e^{-\frac{a}{b n}} r\right ) \int \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \, dx\\ &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n}\right ) \int \frac{\Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x} \, dx\\ &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\left (e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \int \frac{\Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right )}{x} \, dx\\ &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )-\frac{\left (e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \operatorname{Subst}\left (\int \Gamma \left (1+p,-\frac{a+b x}{b n}\right ) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )+\left (e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \operatorname{Subst}\left (\int \Gamma (1+p,x) \, dx,x,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right )\\ &=-e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n} \Gamma \left (2+p,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p}-e e^{-\frac{a}{b n}} r x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a}{b n}-\frac{\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (\frac{a}{b n}+\frac{\log \left (c x^n\right )}{n}\right )+e^{-\frac{a}{b n}} x \left (c x^n\right )^{-1/n} \Gamma \left (1+p,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.30403, size = 146, normalized size = 0.54 \[ x \left (-e^{-\frac{a}{b n}}\right ) \left (c x^n\right )^{-1/n} \left (a+b \log \left (c x^n\right )\right )^{p-1} \left (-\frac{a+b \log \left (c x^n\right )}{b n}\right )^{1-p} \left (\text{Gamma}\left (p+1,-\frac{a+b \log \left (c x^n\right )}{b n}\right ) \left (-a e r-b e r \log \left (c x^n\right )+b d n+b e n \log \left (f x^r\right )\right )-b e n r \text{Gamma}\left (p+2,-\frac{a+b \log \left (c x^n\right )}{b n}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]),x]

[Out]

-((x*(a + b*Log[c*x^n])^(-1 + p)*(-((a + b*Log[c*x^n])/(b*n)))^(1 - p)*(-(b*e*n*r*Gamma[2 + p, -((a + b*Log[c*
x^n])/(b*n))]) + Gamma[1 + p, -((a + b*Log[c*x^n])/(b*n))]*(b*d*n - a*e*r - b*e*r*Log[c*x^n] + b*e*n*Log[f*x^r
])))/(E^(a/(b*n))*(c*x^n)^n^(-1)))

________________________________________________________________________________________

Maple [F]  time = 0.438, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{p} \left ( d+e\ln \left ( f{x}^{r} \right ) \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r)),x)

[Out]

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r)),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 0.904005, size = 339, normalized size = 1.25 \begin{align*} -\frac{{\left (b e r \log \left (c\right ) - b e n \log \left (f\right ) - b d n +{\left (b e n p + b e n + a e\right )} r\right )} e^{\left (-\frac{b n p \log \left (-\frac{1}{b n}\right ) + b \log \left (c\right ) + a}{b n}\right )} \Gamma \left (p + 1, -\frac{b n \log \left (x\right ) + b \log \left (c\right ) + a}{b n}\right ) -{\left (b e n r x \log \left (x\right ) + b e r x \log \left (c\right ) + a e r x\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p}}{b n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="fricas")

[Out]

-((b*e*r*log(c) - b*e*n*log(f) - b*d*n + (b*e*n*p + b*e*n + a*e)*r)*e^(-(b*n*p*log(-1/(b*n)) + b*log(c) + a)/(
b*n))*gamma(p + 1, -(b*n*log(x) + b*log(c) + a)/(b*n)) - (b*e*n*r*x*log(x) + b*e*r*x*log(c) + a*e*r*x)*(b*n*lo
g(x) + b*log(c) + a)^p)/(b*n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**p*(d+e*ln(f*x**r)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (e \log \left (f x^{r}\right ) + d\right )}{\left (b \log \left (c x^{n}\right ) + a\right )}^{p}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r)),x, algorithm="giac")

[Out]

integrate((e*log(f*x^r) + d)*(b*log(c*x^n) + a)^p, x)